//
//  AppDelegate.m
//  WeatherBar
//
//  Created by yby on 2024/6/7.
//

#import "AppDelegate.h"
#import <FBSDKCoreKit/FBSDKCoreKit-Swift.h>
#import <FBSDKCoreKit/FBSDKApplicationDelegate.h>
//@import FBSDKCoreKit;

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
    // 设置主窗口,并设置根控制器
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    [WBControllerManager wb_configRootVC];
    [self.window makeKeyAndVisible];
    
    
    //定位信息
    [[WBLocationManager sharedManager] setAllowsBackgroundLocationUpdates:YES];
    [[WBLocationManager sharedManager] startMonitoringSignificantLocationChanges];
    
    //启动时间
    [WBInfoManager wb_shareInstance].var_sessionId = kGetCurentTime;
    
    [[FBSDKApplicationDelegate sharedInstance] application:application
                             didFinishLaunchingWithOptions:launchOptions];
    return YES;
}

- (BOOL)application:(UIApplication *)application
             openURL:(NSURL *)url
   sourceApplication:(NSString *)sourceApplication
          annotation:(id)annotation {
   return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                         openURL:url
                                               sourceApplication:sourceApplication
                                                      annotation:annotation];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *) options {
    //[[AppsFlyerLib shared] handleOpenUrl:url options:options];
    [[FBSDKApplicationDelegate sharedInstance] application:application
                                                    openURL:url
                                                    options:options];
   // [[TWTRTwitter sharedInstance] application:application openURL:url options:options];
    return YES;
}


@end
